<?php

//登录路由
Route::get('admin/login', 'Admin\LoginController@Login');
Route::post('admin/login', 'Admin\LoginController@doLogin');
Route::get('admin/logout', 'Admin\LoginController@Logout');
// 中间件
Route::group(['namespace'=>"Admin",'prefix'=>'admin','middleware' => 'admin.login'],function(){

	//首页
	Route::resource('index', 'IndexController');
	//welcome页面
	Route::get('welcome','IndexController@welcome');
    //用户相关
    Route::resource('user','UserController');
    //用户状态
    Route::get('sta','UserController@status');
    //删除
    Route::get('del','UserController@delUser');
    //管理员相关
    Route::resource('auser','AuserController');
    //管理员删除
    Route::get('delete','AuserController@delUser');
    //修改密码
    Route::post('modPwd/{id}','AuserController@modPwd');
    Route::get('modPwd/{id}','AuserController@showPwd');
	

	//评论
	Route::get('assess/del','AssessController@del');
	//批量删除
	Route::get('assess/dodel/{id}','AssessController@dodel');
	Route::resource('assess','AssessController');
	//商家删除
	Route::get('shop/del','ShopController@del');
	//商家批量删除
	Route::get('shop/dodel/{id}','ShopController@dodel');
	//商家状态改变
	Route::get('shop/status','ShopController@status');
	//商家
	Route::resource('shop','ShopController');
	

});